<template>
  <div class="remarks">
    <nav-bar>
      <span slot="text">订单备注</span>
    </nav-bar>
    <section class="content">
      <textarea v-model="value" placeholder="请输入备注内容"></textarea>
    </section>
    <button @click="confiRmremark">确定</button>
  </div>
</template>

<script>
import { mapMutations } from 'vuex';

export default {
  data() {
    return {
      value: ''
    };
  },
  methods: {
    ...mapMutations(['CONFIRM_REMARKS']),
    confiRmremark() {
      this.CONFIRM_REMARKS(this.value);
      this.$router.go(-1);
    }
  }
};
</script>

<style lang="less" scoped>
.remarks {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  .content {
    margin-top: 55px;
    padding: 10px;
    textarea {
      width: 100%;
      height: 90px;
      padding: 10px;
      resize: none;
      font-size: var(--font-size);
      border: 1px solid #eee;
      background-color: #f9f9f9;
    }
  }
  button {
    display: block;
    width: 95%;
    line-height: 30px;
    border-radius: 3px;
    margin: 0 auto;
    background-color: var(--color-base);
  }
}
</style>
